<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-area-add"  autocomplete="off">
        	<div class="form-group">	
				<label class="col-sm-3 control-label">区域编码：</label>
				<div class="col-sm-7">
					<input id="areaCode" name="areaCode" class="form-control" type="text" >
					<input id="status" name="status" type="hidden" value="0">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">父级编号：</label>
				<div class="col-sm-7">
					<input id="parentCode" name="parentCode" class="form-control" type="text" th:value="${parentArea?.areaCode}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">所有父级编号：</label>
				<div class="col-sm-7">
					<input id="parentCodes" name="parentCodes" class="form-control" type="text" th:value="${parentArea?.parentCodes+parentArea?.areaCode+','}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">本级排序号：</label>
				<div class="col-sm-7">
					<input id="treeSort" name="treeSort" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">所有级别排序号：</label>
				<div class="col-sm-7">
					<input id="treeSorts" name="treeSorts" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">是否最末级：</label>
				<div class="col-sm-7">
			        <label class="radio-box"><input type="radio" checked value="1" id="treeLeaf1" name="treeLeaf">是</label>
                    <label class="radio-box"><input type="radio" value="0" id="treeLeaf2" name="treeLeaf">否</label>
                    
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">层次级别：</label>
				<div class="col-sm-7">
					<input id="treeLevel" name="treeLevel" class="form-control" type="text" th:value="${parentArea?.treeLevel+1}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">区域名称：</label>
				<div class="col-sm-7">
					<input id="areaName" name="areaName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">全节点名：</label>
				<div class="col-sm-7">
					<input id="treeNames" name="treeNames" class="form-control" type="text" th:value="${parentArea?.treeNames+'/'}">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">区域类型：</label>
				<div class="col-sm-7">
					<input id="areaType" name="areaType" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-7">
					<textarea id="remarks" name="remarks" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/area"
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-area-add').serialize());
	        }
	    }
	</script>
</body>
</html>
